package com.bulletelc.apollopre.module.user.login;

import com.bulletelc.apollopre.framework.IPresenter;
import com.bulletelc.apollopre.framework.IView;

/**
 * author: lhl
 * date  : 2017/10/30
 * desc  : 登录模块MVP的所有方法,类似合同类的接口,将所有P和V的所有方法写一起
 */

public interface LoginContract {

    interface View extends IView {

        void success();

        void fail(String fail);

        void error(String error);

        void onSuccessGetSetting();

        void onFailGetSetting(String fail);

        void onErrorGetSetting(String error);

        void onSuccessWeChatEntry(String unionid);

        void onErrorWeChatEntry(String error);

        void onFailWeChatEntry(String fail);

    }

    interface Presenter extends IPresenter<View> {

        /**
         * @param mobile_number
         * @param password
         * @param equipment_id
         */
        void login(String mobile_number, String password, String equipment_id, String unionid);

        /**
         * 获取跟人信息
         */
        void getSetting();

        /**
         * 微信授权登陆
         *
         */
        void weChatEntry(String code);
    }

}
